﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class QuanTri_QuanLyHocSinh : System.Web.UI.Page
{
    SoLienLacDataContext db = new SoLienLacDataContext();
    clsLoadCombobox cls = new clsLoadCombobox();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ddlNamHoc.DataSource = db.LoadNamHoc();
            ddlNamHoc.DataTextField = "TenNam";
            ddlNamHoc.DataValueField = "MaNam";
            ddlNamHoc.DataBind();
            cls.LoadComboboxKhoi(drpKhoiHoc);
            int makhoi=int.Parse(drpKhoiHoc.SelectedValue.ToString());
            cls.LoadComboboxLopTheoKhoi(drpLopHoc,makhoi);

        }

    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        //for (int i = 1; i < 66; i++)
        //{
        //    HocSinh hs = new HocSinh();
        //    hs.MaHS = (1202140033 + i).ToString();
        //    hs.TenHS = "Trần Văn Đồng";
        //    hs.NgaySinh = DateTime.Parse("07/12/1995");
        //    hs.QueQuan = "Hà Nội";
        //    hs.SDT = "01676286242";
        //    hs.HoTenCha = "Trần Văn A ";
        //    hs.HoTenMe = "Nguyễn Thị Mai";
        //    hs.GioiTinh = "Nam";
        //    hs.DiaChiCha = "Hà Nội";
        //    hs.DiaChiMe = "Hà Nội";
        //    hs.MatKhau = "tranvandong"+(33+i).ToString();
        //    hs.Email = "trang1409tk62@gmail.com";
        //    db.HocSinhs.InsertOnSubmit(hs);
        //    db.SubmitChanges();

        //}
    }
}
